package controller;

import model.game2048.Game2048Model;
import model.game2048solver.Game2048Solver;
import model.maze.MazeModel;
import view.game2048.Game2048View;
import view.maze.MazeView;
/**
Main class.
 * @author Peled Eldan
 * @author Daniel Manor
 */
public class RunModel {

	public static void main(String[] args) 
	{	
		Game2048Model model = new Game2048Model();
		Game2048View ui = new Game2048View();
		Game2048Solver solver = new Game2048Solver();
		try 
		{
			Presenter presenter = new Presenter(model, ui,solver);
			model.addObserver(presenter);
			ui.addObserver(presenter);
			solver.addObserver(presenter);
			
		}
		catch (InterruptedException e) { e.printStackTrace(); }
		/*
		MazeModel model = new MazeModel();
		MazeView ui = new MazeView();
		
		try 
		{
			Presenter presenter = new Presenter(model, ui);
			model.addObserver(presenter);
			ui.addObserver(presenter);
			
		}
		catch (InterruptedException e) { e.printStackTrace(); }
		*/	
		new Thread(ui).start();
		
	}

}
